#include <func.h>
#include "userTask.h"
int enUserQueue(userQueue_t *pUserQueue, int netFd, char *usr_name, char *curPath){
    user_t *node = (user_t *)calloc(1, sizeof(user_t));
    node->netFd = netFd;
    strcpy(node->usr_name, usr_name);
    strcpy(node->curPath, curPath);
    node->pNext = NULL;
    if(pUserQueue->size == 0){
        pUserQueue->pFront = node;
    }else{
        pUserQueue->pRear->pNext = node;
    }
    pUserQueue->pRear = node;
    pUserQueue->size++;
    return 0;
}


int deUserQueue(userQueue_t *pUserQueue){
    user_t *pDel = pUserQueue->pFront;
    pUserQueue->pFront = pUserQueue->pFront->pNext;
    free(pDel);
    --pUserQueue->size;
    return 0;
}